export function getVariableName(title: string = "APP"): string {
  return `_PRODUCTION_${title}_CFG_`;
}

export function getAppEnvConfig() {
  const variableName = getVariableName(import.meta.env.VITE_SHORT_NAME);

  const env = (
    import.meta.env.DEV ? import.meta.env : window[variableName as any]
  ) as ImportMetaEnv;
  return {
    baseUrl: env.VITE_GLOB_BASE_URL,
    mockUrl: env.VITE_GLOB_BASE_MOCK_URL,
    logs:env.VITE_GLOB_LOG,
    logBasePath:env.VITE_GLOB_LOG_BASE_PATH
  };
}
